<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../lib/react.development.js"></script>
    <script src="../lib/react-dom.development.js"></script>
    <script src="../lib/babel.min.js"></script>
</head>
<div id="root">

</div>

<body>
    <script type="text/babel">
        function Header(){
            // 函数组件中this 指向undefined
            return (
                <div className="header">我是Header组件</div>
            )
        }
        function Main(){
            return (
                <div className="main">我是Main组件</div>
            )
        }
        function Footer(){
            return (
                <div className="footer">我是Footer组件</div>
            )
        }
        const root = ReactDOM.createRoot(document.getElementById('root'));
        root.render((
            <>
                <Header/>
                <Main/>
                <Footer/>
            </>
        ));
    </script>
</body>
</html>